#include <iostream>
#include <unistd.h>
#include "Pthread.hpp"

void Print(int num)
{
    while (num--)
    {
        std::cout << "你好" << std::endl;
        sleep(1);
    }
}

int main()
{
    Thread<void, int> p1(Print, 10);
    p1.Create();

    int num = 5;
    while (num--)
    {   
        std::cout << "i am fine thank you " << p1.ThreadName() << std::endl;
        std::cout << "is runing: " << p1.IsRuning() << std::endl;
        sleep(1);
    }
    p1.Jion();

    return 0;
}